package priv.yiyuan.example.design.adapter;

import priv.yiyuan.example.design.adapter.impl.MediaAdapter;

/**
 * 适配器工厂接口实现类
 *
 * @author YiYuan
 * @data 2025/8/5
 * @apoNote
 */
public class ConcreteMediaAdapterFactory implements MediaAdapterFactory {

    @Override
    public MediaPlayer createAdapter(String audioType) {
        if (audioType.equalsIgnoreCase("mp4") || audioType.equalsIgnoreCase("vlc")) {
            return new MediaAdapter(audioType);
        }

        return null;
    }
}
